package com.ruoyi.weiriya.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ruoyi.weiriya.domain.WNonVipSetting;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 非会员购买设置Mapper接口
 * 
 * @author lynn
 * @date 2023-08-01
 */
public interface WNonVipSettingMapper extends BaseMapper<WNonVipSetting>
{

    @Select("SELECT nvs.*,a.name area_name FROM w_non_vip_setting nvs " +
            "LEFT JOIN w_area a on a.id = nvs.area_id   ${ew.customSqlSegment}")
    List<WNonVipSetting> getList(@Param(Constants.WRAPPER) QueryWrapper<WNonVipSetting> queryWrapper);

    @Select("SELECT nvs.*,a.name area_name FROM w_non_vip_setting nvs " +
            "LEFT JOIN w_area a on a.id = nvs.area_id " +
            "WHERE nvs.id = {id}")
    WNonVipSetting getChargeWNonVipSettingById(String id);

    @Select("SELECT nvs.*,a.name area_name FROM w_non_vip_setting nvs " +
            "LEFT JOIN w_area a on a.id = nvs.area_id " +
            "WHERE nvs.id = {id}")
    WNonVipSetting getDepositWNonVipSettingById(String id);
}
